﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using AlmaDatabase;

namespace Alma.Models
{
    public class CriterionComparer
    {
        public string Target { get; set; }
        public string Operator { get; set; }
        public string Value { get; set; }
    }

    public class AdvancedSearchModel
    {
        public AdvancedSearchModel()
        {
            AllWords = "";
            Expression = "";
            SomeWords = "";
            NoneWord = "";
        }

        public string AllWords { get; set; }
        public string Expression { get; set; }
        public string SomeWords { get; set; }
        public string NoneWord { get; set; }

        public List<SelectListItem> CategoriesItems { get; set; }
        public string Category { get; set; }

        public List<SelectListItem> SectionItems { get; set; }
        public string Section { get; set; }

        public List<CriterionComparer> Criterions { get; set; }

        public void TrimAll()
        {
            AllWords = AllWords.Trim();
            Expression = Expression.Trim();
            SomeWords = SomeWords.Trim();
            NoneWord = NoneWord.Trim();
        }

    }
}